#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "mytextedit.h"

#include "higlighter.h"
#include "dictform.h"
//#include "finddialog.h"

QT_BEGIN_NAMESPACE
class QTextEdit;
QT_END_NAMESPACE

//! [0]
class MainWindow : public QMainWindow
{
    Q_OBJECT
    FILE * input_file_;
    DictForm dict_form_;
    //FindDialog fDialog_;

protected:
    void closeEvent(QCloseEvent *event);

public:
    MainWindow(QWidget *parent = 0);
    MyTextEdit *editor;

public slots:
    void showDict();
    void about();
    void openFile(const QString &path = QString());
    void reAnalys();
    void findWord();

private:
    void setupEditor();
    void setupFileMenu();
    void setupHelpMenu();
    void setupEditMenu();


    Higlighter *higlighter;
    QString fileName_;
};
//! [0]

#endif
